import request from '@/utils/request'
import { GET_USER_INFO } from '../constants';
//获取用户信息\

export const getUserInfo = () => {
    return async dispatch => {
        const res = await request.get('user/profile')
        // console.log(res);
        //存起来
        dispatch({
            type: GET_USER_INFO,
            payload: res.data.data
        })
    }
}